package com.tcm.core.domain.enums;

import com.base.core.result.ResponseCodeEnum;

/**
 * 错误码枚举类
 *
 * 医院信息，使用 1-006-000-000 段
 */
public enum BusinessCodeEnum implements ResponseCodeEnum {

    // ========== DEPARTMENT 模块 ==========
    DEPARTMENT_PARENT_NOT_EXISTS(1004001000, "父科室不存在"),
    DEPARTMENT_MUST_ENABLE(1004001007, "禁用的科室不可用"),
    DEPARTMENT_NOT_EXISTS(1004001001, "科室不存在"),
    DEPARTMENT_CHILD_CATEGORY_EXISTS(1004001003, "科室子类存在，请先删除子类"),
    DEPARTMENT_PARENT_NOT_SELF(1004001002, "不能设置自己为父科室"),
    DEPARTMENT_STATUS_EQUALS(1004001005, "科室已经是该状态"),
    DEPARTMENT_DELETE_ONLY_DISABLE(1004001004, "只有关闭的科室才可以删除"),
    DEPARTMENT_PARENT_CAN_NOT_BE_LEAF(1004001005, "父科室必须是叶子(最后一级)科室"),
    DEPARTMENT_MUST_BE_LEVEL2(1004001006, "只能添加在最后一级科室下"),

    //++++++++++++++HOSPITAL 模块+++++++++++++++++
    HOSPITAL_NAME_EXISTS(1007002001, "医院存在，请勿重复添加"),
    HOSPITAL_PARAMS_NOT_FOUND(1007002002, "医院信息参数没有找到"),
    HOSPITAL_NAME_NOT_FOUND(1007002003, "缺少医院名称"),
    HOSPITAL_ID_NOT_FOUND(1007002004, "缺少医院id"),
    REGISTER_HX_ID_FALI(1007002005, "注册环信账号失败"),


    //===============订单模块=====================
    ID_NOT_EXISTS(1001001001, "订单主键id不存在"),
    ORDER_ITEM_DATA_NOT_EXISTS(1001001003, "订单项数据不存在"),
    ORDER_PARAM_DATA_NOT_EXISTS(1001001002, "订单数据不存在"),
    DOCTOR_ID_CAN_NOT_EMPTY(1002001001, "医生不能为空"),
    MSG_CAN_NOT_EMPTY(1002001002, "留言不能为空"),

    ;


    private final int code;
    private final String message;

    BusinessCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
